package com.xfatm.simplebrowser.util;

import android.content.Context;
import android.content.SharedPreferences;

/**
 * Created by wenjie on 2018/3/14.
 */

public class SharedPreferencesUtils {

    public static void save(Context mContext,String name, String value) {
        SharedPreferences sp = mContext.getSharedPreferences("xfatm", Context.MODE_PRIVATE);
        SharedPreferences.Editor editor = sp.edit();
        editor.putString(name, value);
        editor.commit();
    }

    public static String read(Context mContext,String name) {
        SharedPreferences sp = mContext.getSharedPreferences("xfatm", Context.MODE_PRIVATE);
        return sp.getString(name, "");
    }

}
